home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / makefile < prev    next >
Makefile  |  1996-09-13  |  2KB  |  48 lines

  1. TOP=..
  2.  
  3. include $(TOP)/make.cfg
  4.  
  5. FILES = adddosentry addprocess allocdosobject assignlock attemptlockdoslist \
  6.     cli close createnewproc currentdir datetostr delay duplock exall    \
  7.     examine fgetc findarg finddosentry flush fputc fputs freeargs        \
  8.     freedosentry freedosobject getargstr input ioerr isinteractive        \
  9.     loadseg lockdoslist makedosentry maxcli namefromlock open        \
  10.     openfromlock output printfault putstr read readargs readitem        \
  11.     remdosentry runcommand seek selectinput selectoutput setioerr        \
  12.     setowner strtolong ungetc unloadseg unlockdoslist vfprintf        \
  13.     vprintf write filepart addbuffers changemode createdir deletefile   \
  14.     exallend isfilesystem lock matchpattern matchpatternnocase        \
  15.     parsepattern parsepatternnocase setcomment setfiledate setfilesize  \
  16.     setprotection
  17.  
  18. all: setup $(OSGENDIR)/dos_init.o $(OSGENDIR)/dos_functable.o \
  19.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o) \
  20.     $(OSGENDIR)/lddemon.o \
  21.     $(OSGENDIR)/errorlist.o \
  22.     $(OSGENDIR)/loadseg_elf.o \
  23.     $(OSGENDIR)/doname.o \
  24.  
  25. setup :
  26.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; fi
  27.  
  28. clean:
  29.     $(RM) $(OSGENDIR) *.err $(LIBDIR)/libdos.a
  30.  
  31. $(OSGENDIR)/%.o: %.c
  32.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  33.     if test ! -s $*.err; then rm $*.err; fi
  34.  
  35. dos_functable.c : $(foreach f,$(FILES),$(f).c) \
  36.         $(TOP)/scripts/makefunctable.awk
  37.     gawk -f $(TOP)/scripts/makefunctable.awk \
  38.         --assign lib=Dos \
  39.         $(foreach f,$(FILES),$(f).c)
  40.  
  41. $(OSGENDIR)/%.d: %.c
  42.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; fi
  43.     @$(RM) $@
  44.     @touch $@
  45.     $(MKDEPEND) -f$@ -p$(OSGENDIR)/ -- $(CFLAGS) -- $^
  46.  
  47. include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  48.